3.72 \(\int \frac {(a+b \tan (e+f x)) (A+B \tan (e+f x)+C \tan ^2(e+f x))}{c+d \tan (e+f x)} \, dx\)

Optimal. Leaf size=156 \[ -\frac {(b c-a d) \left (A d^2-B c d+c^2 C\right ) \log (c+d \tan (e+f x))}{d^2 f \left (c^2+d^2\right )}-\frac {\log (\cos (e+f x)) (-a A d+a B c+a C d+A b c+b B d-b c C)}{f \left (c^2+d^2\right )}+\frac {x (a (A c+B d-c C)-b (B c-d (A-C)))}{c^2+d^2}+\frac {b C \tan (e+f x)}{d f} \]

[Out]

(a*(A*c+B*d-C*c)-b*(B*c-(A-C)*d))*x/(c^2+d^2)-(-A*a*d+A*b*c+B*a*c+B*b*d+C*a*d-C*b*c)*ln(cos(f*x+e))/(c^2+d^2)/
f-(-a*d+b*c)*(A*d^2-B*c*d+C*c^2)*ln(c+d*tan(f*x+e))/d^2/(c^2+d^2)/f+b*C*tan(f*x+e)/d/f

________________________________________________________________________________________

Rubi [A]  time = 0.34, antiderivative size = 156, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 5, integrand size = 43, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.116, Rules used = {3637, 3626, 3617, 31, 3475} \[ -\frac {(b c-a d) \left (A d^2-B c d+c^2 C\right ) \log (c+d \tan (e+f x))}{d^2 f \left (c^2+d^2\right )}-\frac {\log (\cos (e+f x)) (-a A d+a B c+a C d+A b c+b B d-b c C)}{f \left (c^2+d^2\right )}+\frac {x (a (A c+B d-c C)-b (B c-d (A-C)))}{c^2+d^2}+\frac {b C \tan (e+f x)}{d f} \]

Antiderivative was successfully verified.

[In]

Int[((a + b*Tan[e + f*x])*(A + B*Tan[e + f*x] + C*Tan[e + f*x]^2))/(c + d*Tan[e + f*x]),x]

[Out]

((a*(A*c - c*C + B*d) - b*(B*c - (A - C)*d))*x)/(c^2 + d^2) - ((A*b*c + a*B*c - b*c*C - a*A*d + b*B*d + a*C*d)
*Log[Cos[e + f*x]])/((c^2 + d^2)*f) - ((b*c - a*d)*(c^2*C - B*c*d + A*d^2)*Log[c + d*Tan[e + f*x]])/(d^2*(c^2
+ d^2)*f) + (b*C*Tan[e + f*x])/(d*f)

Rule 31

Int[((a_) + (b_.)*(x_))^(-1), x_Symbol] :> Simp[Log[RemoveContent[a + b*x, x]]/b, x] /; FreeQ[{a, b}, x]

Rule 3475

Int[tan[(c_.) + (d_.)*(x_)], x_Symbol] :> -Simp[Log[RemoveContent[Cos[c + d*x], x]]/d, x] /; FreeQ[{c, d}, x]

Rule 3617

Int[((a_.) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(m_.)*((A_) + (C_.)*tan[(e_.) + (f_.)*(x_)]^2), x_Symbol] :> Dist[
A/(b*f), Subst[Int[(a + x)^m, x], x, b*Tan[e + f*x]], x] /; FreeQ[{a, b, e, f, A, C, m}, x] && EqQ[A, C]

Rule 3626

Int[((A_) + (B_.)*tan[(e_.) + (f_.)*(x_)] + (C_.)*tan[(e_.) + (f_.)*(x_)]^2)/((a_.) + (b_.)*tan[(e_.) + (f_.)*
(x_)]), x_Symbol] :> Simp[((a*A + b*B - a*C)*x)/(a^2 + b^2), x] + (Dist[(A*b^2 - a*b*B + a^2*C)/(a^2 + b^2), I
nt[(1 + Tan[e + f*x]^2)/(a + b*Tan[e + f*x]), x], x] - Dist[(A*b - a*B - b*C)/(a^2 + b^2), Int[Tan[e + f*x], x
], x]) /; FreeQ[{a, b, e, f, A, B, C}, x] && NeQ[A*b^2 - a*b*B + a^2*C, 0] && NeQ[a^2 + b^2, 0] && NeQ[A*b - a
*B - b*C, 0]

Rule 3637

Int[((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)])*((c_.) + (d_.)*tan[(e_.) + (f_.)*(x_)])^(n_.)*((A_.) + (B_.)*tan[(e
_.) + (f_.)*(x_)] + (C_.)*tan[(e_.) + (f_.)*(x_)]^2), x_Symbol] :> Simp[(b*C*Tan[e + f*x]*(c + d*Tan[e + f*x])
^(n + 1))/(d*f*(n + 2)), x] - Dist[1/(d*(n + 2)), Int[(c + d*Tan[e + f*x])^n*Simp[b*c*C - a*A*d*(n + 2) - (A*b
 + a*B - b*C)*d*(n + 2)*Tan[e + f*x] - (a*C*d*(n + 2) - b*(c*C - B*d*(n + 2)))*Tan[e + f*x]^2, x], x], x] /; F
reeQ[{a, b, c, d, e, f, A, B, C, n}, x] && NeQ[b*c - a*d, 0] && NeQ[c^2 + d^2, 0] &&  !LtQ[n, -1]

Rubi steps

\begin {align*} \int \frac {(a+b \tan (e+f x)) \left (A+B \tan (e+f x)+C \tan ^2(e+f x)\right )}{c+d \tan (e+f x)} \, dx &=\frac {b C \tan (e+f x)}{d f}-\frac {\int \frac {b c C-a A d-(A b+a B-b C) d \tan (e+f x)+(b c C-b B d-a C d) \tan ^2(e+f x)}{c+d \tan (e+f x)} \, dx}{d}\\ &=\frac {(a (A c-c C+B d)-b (B c-(A-C) d)) x}{c^2+d^2}+\frac {b C \tan (e+f x)}{d f}+\frac {(A b c+a B c-b c C-a A d+b B d+a C d) \int \tan (e+f x) \, dx}{c^2+d^2}-\frac {\left ((b c-a d) \left (c^2 C-B c d+A d^2\right )\right ) \int \frac {1+\tan ^2(e+f x)}{c+d \tan (e+f x)} \, dx}{d \left (c^2+d^2\right )}\\ &=\frac {(a (A c-c C+B d)-b (B c-(A-C) d)) x}{c^2+d^2}-\frac {(A b c+a B c-b c C-a A d+b B d+a C d) \log (\cos (e+f x))}{\left (c^2+d^2\right ) f}+\frac {b C \tan (e+f x)}{d f}-\frac {\left ((b c-a d) \left (c^2 C-B c d+A d^2\right )\right ) \operatorname {Subst}\left (\int \frac {1}{c+x} \, dx,x,d \tan (e+f x)\right )}{d^2 \left (c^2+d^2\right ) f}\\ &=\frac {(a (A c-c C+B d)-b (B c-(A-C) d)) x}{c^2+d^2}-\frac {(A b c+a B c-b c C-a A d+b B d+a C d) \log (\cos (e+f x))}{\left (c^2+d^2\right ) f}-\frac {(b c-a d) \left (c^2 C-B c d+A d^2\right ) \log (c+d \tan (e+f x))}{d^2 \left (c^2+d^2\right ) f}+\frac {b C \tan (e+f x)}{d f}\\ \end {align*}

________________________________________________________________________________________

Mathematica [C]  time = 1.09, size = 148, normalized size = 0.95 \[ \frac {\frac {2 (a d-b c) \left (A d^2-B c d+c^2 C\right ) \log (c+d \tan (e+f x))}{d^2 \left (c^2+d^2\right )}+\frac {(b-i a) (A+i B-C) \log (-\tan (e+f x)+i)}{c+i d}+\frac {(b+i a) (A-i B-C) \log (\tan (e+f x)+i)}{c-i d}+\frac {2 b C \tan (e+f x)}{d}}{2 f} \]

Antiderivative was successfully verified.

[In]

Integrate[((a + b*Tan[e + f*x])*(A + B*Tan[e + f*x] + C*Tan[e + f*x]^2))/(c + d*Tan[e + f*x]),x]

[Out]

((((-I)*a + b)*(A + I*B - C)*Log[I - Tan[e + f*x]])/(c + I*d) + ((I*a + b)*(A - I*B - C)*Log[I + Tan[e + f*x]]
)/(c - I*d) + (2*(-(b*c) + a*d)*(c^2*C - B*c*d + A*d^2)*Log[c + d*Tan[e + f*x]])/(d^2*(c^2 + d^2)) + (2*b*C*Ta
n[e + f*x])/d)/(2*f)

________________________________________________________________________________________

fricas [A]  time = 0.85, size = 212, normalized size = 1.36 \[ \frac {2 \, {\left ({\left ({\left (A - C\right )} a - B b\right )} c d^{2} + {\left (B a + {\left (A - C\right )} b\right )} d^{3}\right )} f x - {\left (C b c^{3} - A a d^{3} - {\left (C a + B b\right )} c^{2} d + {\left (B a + A b\right )} c d^{2}\right )} \log \left (\frac {d^{2} \tan \left (f x + e\right )^{2} + 2 \, c d \tan \left (f x + e\right ) + c^{2}}{\tan \left (f x + e\right )^{2} + 1}\right ) + {\left (C b c^{3} + C b c d^{2} - {\left (C a + B b\right )} c^{2} d - {\left (C a + B b\right )} d^{3}\right )} \log \left (\frac {1}{\tan \left (f x + e\right )^{2} + 1}\right ) + 2 \, {\left (C b c^{2} d + C b d^{3}\right )} \tan \left (f x + e\right )}{2 \, {\left (c^{2} d^{2} + d^{4}\right )} f} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*tan(f*x+e))*(A+B*tan(f*x+e)+C*tan(f*x+e)^2)/(c+d*tan(f*x+e)),x, algorithm="fricas")

[Out]

1/2*(2*(((A - C)*a - B*b)*c*d^2 + (B*a + (A - C)*b)*d^3)*f*x - (C*b*c^3 - A*a*d^3 - (C*a + B*b)*c^2*d + (B*a +
 A*b)*c*d^2)*log((d^2*tan(f*x + e)^2 + 2*c*d*tan(f*x + e) + c^2)/(tan(f*x + e)^2 + 1)) + (C*b*c^3 + C*b*c*d^2
- (C*a + B*b)*c^2*d - (C*a + B*b)*d^3)*log(1/(tan(f*x + e)^2 + 1)) + 2*(C*b*c^2*d + C*b*d^3)*tan(f*x + e))/((c
^2*d^2 + d^4)*f)

________________________________________________________________________________________

giac [A]  time = 1.93, size = 186, normalized size = 1.19 \[ \frac {\frac {2 \, C b \tan \left (f x + e\right )}{d} + \frac {2 \, {\left (A a c - C a c - B b c + B a d + A b d - C b d\right )} {\left (f x + e\right )}}{c^{2} + d^{2}} + \frac {{\left (B a c + A b c - C b c - A a d + C a d + B b d\right )} \log \left (\tan \left (f x + e\right )^{2} + 1\right )}{c^{2} + d^{2}} - \frac {2 \, {\left (C b c^{3} - C a c^{2} d - B b c^{2} d + B a c d^{2} + A b c d^{2} - A a d^{3}\right )} \log \left ({\left | d \tan \left (f x + e\right ) + c \right |}\right )}{c^{2} d^{2} + d^{4}}}{2 \, f} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*tan(f*x+e))*(A+B*tan(f*x+e)+C*tan(f*x+e)^2)/(c+d*tan(f*x+e)),x, algorithm="giac")

[Out]

1/2*(2*C*b*tan(f*x + e)/d + 2*(A*a*c - C*a*c - B*b*c + B*a*d + A*b*d - C*b*d)*(f*x + e)/(c^2 + d^2) + (B*a*c +
 A*b*c - C*b*c - A*a*d + C*a*d + B*b*d)*log(tan(f*x + e)^2 + 1)/(c^2 + d^2) - 2*(C*b*c^3 - C*a*c^2*d - B*b*c^2
*d + B*a*c*d^2 + A*b*c*d^2 - A*a*d^3)*log(abs(d*tan(f*x + e) + c))/(c^2*d^2 + d^4))/f

________________________________________________________________________________________

maple [B]  time = 0.25, size = 506, normalized size = 3.24 \[ \frac {b C \tan \left (f x +e \right )}{d f}+\frac {d \ln \left (c +d \tan \left (f x +e \right )\right ) A a}{f \left (c^{2}+d^{2}\right )}-\frac {\ln \left (c +d \tan \left (f x +e \right )\right ) A b c}{f \left (c^{2}+d^{2}\right )}-\frac {\ln \left (c +d \tan \left (f x +e \right )\right ) B a c}{f \left (c^{2}+d^{2}\right )}+\frac {\ln \left (c +d \tan \left (f x +e \right )\right ) B \,c^{2} b}{f d \left (c^{2}+d^{2}\right )}+\frac {\ln \left (c +d \tan \left (f x +e \right )\right ) C \,c^{2} a}{f d \left (c^{2}+d^{2}\right )}-\frac {\ln \left (c +d \tan \left (f x +e \right )\right ) C \,c^{3} b}{f \,d^{2} \left (c^{2}+d^{2}\right )}-\frac {\ln \left (1+\tan ^{2}\left (f x +e \right )\right ) A a d}{2 f \left (c^{2}+d^{2}\right )}+\frac {\ln \left (1+\tan ^{2}\left (f x +e \right )\right ) A b c}{2 f \left (c^{2}+d^{2}\right )}+\frac {\ln \left (1+\tan ^{2}\left (f x +e \right )\right ) B a c}{2 f \left (c^{2}+d^{2}\right )}+\frac {\ln \left (1+\tan ^{2}\left (f x +e \right )\right ) B b d}{2 f \left (c^{2}+d^{2}\right )}+\frac {\ln \left (1+\tan ^{2}\left (f x +e \right )\right ) a C d}{2 f \left (c^{2}+d^{2}\right )}-\frac {\ln \left (1+\tan ^{2}\left (f x +e \right )\right ) C b c}{2 f \left (c^{2}+d^{2}\right )}+\frac {A \arctan \left (\tan \left (f x +e \right )\right ) a c}{f \left (c^{2}+d^{2}\right )}+\frac {A \arctan \left (\tan \left (f x +e \right )\right ) b d}{f \left (c^{2}+d^{2}\right )}+\frac {B \arctan \left (\tan \left (f x +e \right )\right ) a d}{f \left (c^{2}+d^{2}\right )}-\frac {B \arctan \left (\tan \left (f x +e \right )\right ) b c}{f \left (c^{2}+d^{2}\right )}-\frac {C \arctan \left (\tan \left (f x +e \right )\right ) a c}{f \left (c^{2}+d^{2}\right )}-\frac {C \arctan \left (\tan \left (f x +e \right )\right ) b d}{f \left (c^{2}+d^{2}\right )} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a+b*tan(f*x+e))*(A+B*tan(f*x+e)+C*tan(f*x+e)^2)/(c+d*tan(f*x+e)),x)

[Out]

b*C*tan(f*x+e)/d/f+1/f*d/(c^2+d^2)*ln(c+d*tan(f*x+e))*A*a-1/f/(c^2+d^2)*ln(c+d*tan(f*x+e))*A*b*c-1/f/(c^2+d^2)
*ln(c+d*tan(f*x+e))*B*a*c+1/f/d/(c^2+d^2)*ln(c+d*tan(f*x+e))*B*c^2*b+1/f/d/(c^2+d^2)*ln(c+d*tan(f*x+e))*C*c^2*
a-1/f/d^2/(c^2+d^2)*ln(c+d*tan(f*x+e))*C*c^3*b-1/2/f/(c^2+d^2)*ln(1+tan(f*x+e)^2)*A*a*d+1/2/f/(c^2+d^2)*ln(1+t
an(f*x+e)^2)*A*b*c+1/2/f/(c^2+d^2)*ln(1+tan(f*x+e)^2)*B*a*c+1/2/f/(c^2+d^2)*ln(1+tan(f*x+e)^2)*B*b*d+1/2/f/(c^
2+d^2)*ln(1+tan(f*x+e)^2)*a*C*d-1/2/f/(c^2+d^2)*ln(1+tan(f*x+e)^2)*C*b*c+1/f/(c^2+d^2)*A*arctan(tan(f*x+e))*a*
c+1/f/(c^2+d^2)*A*arctan(tan(f*x+e))*b*d+1/f/(c^2+d^2)*B*arctan(tan(f*x+e))*a*d-1/f/(c^2+d^2)*B*arctan(tan(f*x
+e))*b*c-1/f/(c^2+d^2)*C*arctan(tan(f*x+e))*a*c-1/f/(c^2+d^2)*C*arctan(tan(f*x+e))*b*d

________________________________________________________________________________________

maxima [A]  time = 1.49, size = 178, normalized size = 1.14 \[ \frac {\frac {2 \, C b \tan \left (f x + e\right )}{d} + \frac {2 \, {\left ({\left ({\left (A - C\right )} a - B b\right )} c + {\left (B a + {\left (A - C\right )} b\right )} d\right )} {\left (f x + e\right )}}{c^{2} + d^{2}} - \frac {2 \, {\left (C b c^{3} - A a d^{3} - {\left (C a + B b\right )} c^{2} d + {\left (B a + A b\right )} c d^{2}\right )} \log \left (d \tan \left (f x + e\right ) + c\right )}{c^{2} d^{2} + d^{4}} + \frac {{\left ({\left (B a + {\left (A - C\right )} b\right )} c - {\left ({\left (A - C\right )} a - B b\right )} d\right )} \log \left (\tan \left (f x + e\right )^{2} + 1\right )}{c^{2} + d^{2}}}{2 \, f} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*tan(f*x+e))*(A+B*tan(f*x+e)+C*tan(f*x+e)^2)/(c+d*tan(f*x+e)),x, algorithm="maxima")

[Out]

1/2*(2*C*b*tan(f*x + e)/d + 2*(((A - C)*a - B*b)*c + (B*a + (A - C)*b)*d)*(f*x + e)/(c^2 + d^2) - 2*(C*b*c^3 -
 A*a*d^3 - (C*a + B*b)*c^2*d + (B*a + A*b)*c*d^2)*log(d*tan(f*x + e) + c)/(c^2*d^2 + d^4) + ((B*a + (A - C)*b)
*c - ((A - C)*a - B*b)*d)*log(tan(f*x + e)^2 + 1)/(c^2 + d^2))/f

________________________________________________________________________________________

mupad [B]  time = 10.25, size = 186, normalized size = 1.19 \[ \frac {\ln \left (\mathrm {tan}\left (e+f\,x\right )-\mathrm {i}\right )\,\left (A\,b+B\,a-C\,b-A\,a\,1{}\mathrm {i}+B\,b\,1{}\mathrm {i}+C\,a\,1{}\mathrm {i}\right )}{2\,f\,\left (c+d\,1{}\mathrm {i}\right )}+\frac {\ln \left (\mathrm {tan}\left (e+f\,x\right )+1{}\mathrm {i}\right )\,\left (B\,b+A\,b\,1{}\mathrm {i}+B\,a\,1{}\mathrm {i}-A\,a+C\,a-C\,b\,1{}\mathrm {i}\right )}{2\,f\,\left (d+c\,1{}\mathrm {i}\right )}-\frac {\ln \left (c+d\,\mathrm {tan}\left (e+f\,x\right )\right )\,\left (d^2\,\left (A\,b\,c+B\,a\,c\right )-d\,\left (B\,b\,c^2+C\,a\,c^2\right )-A\,a\,d^3+C\,b\,c^3\right )}{f\,\left (c^2\,d^2+d^4\right )}+\frac {C\,b\,\mathrm {tan}\left (e+f\,x\right )}{d\,f} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(((a + b*tan(e + f*x))*(A + B*tan(e + f*x) + C*tan(e + f*x)^2))/(c + d*tan(e + f*x)),x)

[Out]

(log(tan(e + f*x) - 1i)*(A*b - A*a*1i + B*a + B*b*1i + C*a*1i - C*b))/(2*f*(c + d*1i)) + (log(tan(e + f*x) + 1
i)*(A*b*1i - A*a + B*a*1i + B*b + C*a - C*b*1i))/(2*f*(c*1i + d)) - (log(c + d*tan(e + f*x))*(d^2*(A*b*c + B*a
*c) - d*(B*b*c^2 + C*a*c^2) - A*a*d^3 + C*b*c^3))/(f*(d^4 + c^2*d^2)) + (C*b*tan(e + f*x))/(d*f)

________________________________________________________________________________________

sympy [A]  time = 2.41, size = 2429, normalized size = 15.57 \[ \text {result too large to display} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*tan(f*x+e))*(A+B*tan(f*x+e)+C*tan(f*x+e)**2)/(c+d*tan(f*x+e)),x)

[Out]

Piecewise((zoo*x*(a + b*tan(e))*(A + B*tan(e) + C*tan(e)**2)/tan(e), Eq(c, 0) & Eq(d, 0) & Eq(f, 0)), ((A*a*x
+ A*b*log(tan(e + f*x)**2 + 1)/(2*f) + B*a*log(tan(e + f*x)**2 + 1)/(2*f) - B*b*x + B*b*tan(e + f*x)/f - C*a*x
 + C*a*tan(e + f*x)/f - C*b*log(tan(e + f*x)**2 + 1)/(2*f) + C*b*tan(e + f*x)**2/(2*f))/c, Eq(d, 0)), (-I*A*a*
f*x*tan(e + f*x)/(-2*d*f*tan(e + f*x) + 2*I*d*f) - A*a*f*x/(-2*d*f*tan(e + f*x) + 2*I*d*f) - I*A*a/(-2*d*f*tan
(e + f*x) + 2*I*d*f) - A*b*f*x*tan(e + f*x)/(-2*d*f*tan(e + f*x) + 2*I*d*f) + I*A*b*f*x/(-2*d*f*tan(e + f*x) +
 2*I*d*f) + A*b/(-2*d*f*tan(e + f*x) + 2*I*d*f) - B*a*f*x*tan(e + f*x)/(-2*d*f*tan(e + f*x) + 2*I*d*f) + I*B*a
*f*x/(-2*d*f*tan(e + f*x) + 2*I*d*f) + B*a/(-2*d*f*tan(e + f*x) + 2*I*d*f) - I*B*b*f*x*tan(e + f*x)/(-2*d*f*ta
n(e + f*x) + 2*I*d*f) - B*b*f*x/(-2*d*f*tan(e + f*x) + 2*I*d*f) - B*b*log(tan(e + f*x)**2 + 1)*tan(e + f*x)/(-
2*d*f*tan(e + f*x) + 2*I*d*f) + I*B*b*log(tan(e + f*x)**2 + 1)/(-2*d*f*tan(e + f*x) + 2*I*d*f) + I*B*b/(-2*d*f
*tan(e + f*x) + 2*I*d*f) - I*C*a*f*x*tan(e + f*x)/(-2*d*f*tan(e + f*x) + 2*I*d*f) - C*a*f*x/(-2*d*f*tan(e + f*
x) + 2*I*d*f) - C*a*log(tan(e + f*x)**2 + 1)*tan(e + f*x)/(-2*d*f*tan(e + f*x) + 2*I*d*f) + I*C*a*log(tan(e +
f*x)**2 + 1)/(-2*d*f*tan(e + f*x) + 2*I*d*f) + I*C*a/(-2*d*f*tan(e + f*x) + 2*I*d*f) + 3*C*b*f*x*tan(e + f*x)/
(-2*d*f*tan(e + f*x) + 2*I*d*f) - 3*I*C*b*f*x/(-2*d*f*tan(e + f*x) + 2*I*d*f) - I*C*b*log(tan(e + f*x)**2 + 1)
*tan(e + f*x)/(-2*d*f*tan(e + f*x) + 2*I*d*f) - C*b*log(tan(e + f*x)**2 + 1)/(-2*d*f*tan(e + f*x) + 2*I*d*f) -
 2*C*b*tan(e + f*x)**2/(-2*d*f*tan(e + f*x) + 2*I*d*f) - 3*C*b/(-2*d*f*tan(e + f*x) + 2*I*d*f), Eq(c, -I*d)),
(I*A*a*f*x*tan(e + f*x)/(-2*d*f*tan(e + f*x) - 2*I*d*f) - A*a*f*x/(-2*d*f*tan(e + f*x) - 2*I*d*f) + I*A*a/(-2*
d*f*tan(e + f*x) - 2*I*d*f) - A*b*f*x*tan(e + f*x)/(-2*d*f*tan(e + f*x) - 2*I*d*f) - I*A*b*f*x/(-2*d*f*tan(e +
 f*x) - 2*I*d*f) + A*b/(-2*d*f*tan(e + f*x) - 2*I*d*f) - B*a*f*x*tan(e + f*x)/(-2*d*f*tan(e + f*x) - 2*I*d*f)
- I*B*a*f*x/(-2*d*f*tan(e + f*x) - 2*I*d*f) + B*a/(-2*d*f*tan(e + f*x) - 2*I*d*f) + I*B*b*f*x*tan(e + f*x)/(-2
*d*f*tan(e + f*x) - 2*I*d*f) - B*b*f*x/(-2*d*f*tan(e + f*x) - 2*I*d*f) - B*b*log(tan(e + f*x)**2 + 1)*tan(e +
f*x)/(-2*d*f*tan(e + f*x) - 2*I*d*f) - I*B*b*log(tan(e + f*x)**2 + 1)/(-2*d*f*tan(e + f*x) - 2*I*d*f) - I*B*b/
(-2*d*f*tan(e + f*x) - 2*I*d*f) + I*C*a*f*x*tan(e + f*x)/(-2*d*f*tan(e + f*x) - 2*I*d*f) - C*a*f*x/(-2*d*f*tan
(e + f*x) - 2*I*d*f) - C*a*log(tan(e + f*x)**2 + 1)*tan(e + f*x)/(-2*d*f*tan(e + f*x) - 2*I*d*f) - I*C*a*log(t
an(e + f*x)**2 + 1)/(-2*d*f*tan(e + f*x) - 2*I*d*f) - I*C*a/(-2*d*f*tan(e + f*x) - 2*I*d*f) + 3*C*b*f*x*tan(e
+ f*x)/(-2*d*f*tan(e + f*x) - 2*I*d*f) + 3*I*C*b*f*x/(-2*d*f*tan(e + f*x) - 2*I*d*f) + I*C*b*log(tan(e + f*x)*
*2 + 1)*tan(e + f*x)/(-2*d*f*tan(e + f*x) - 2*I*d*f) - C*b*log(tan(e + f*x)**2 + 1)/(-2*d*f*tan(e + f*x) - 2*I
*d*f) - 2*C*b*tan(e + f*x)**2/(-2*d*f*tan(e + f*x) - 2*I*d*f) - 3*C*b/(-2*d*f*tan(e + f*x) - 2*I*d*f), Eq(c, I
*d)), (x*(a + b*tan(e))*(A + B*tan(e) + C*tan(e)**2)/(c + d*tan(e)), Eq(f, 0)), (2*A*a*c*d**2*f*x/(2*c**2*d**2
*f + 2*d**4*f) + 2*A*a*d**3*log(c/d + tan(e + f*x))/(2*c**2*d**2*f + 2*d**4*f) - A*a*d**3*log(tan(e + f*x)**2
+ 1)/(2*c**2*d**2*f + 2*d**4*f) - 2*A*b*c*d**2*log(c/d + tan(e + f*x))/(2*c**2*d**2*f + 2*d**4*f) + A*b*c*d**2
*log(tan(e + f*x)**2 + 1)/(2*c**2*d**2*f + 2*d**4*f) + 2*A*b*d**3*f*x/(2*c**2*d**2*f + 2*d**4*f) - 2*B*a*c*d**
2*log(c/d + tan(e + f*x))/(2*c**2*d**2*f + 2*d**4*f) + B*a*c*d**2*log(tan(e + f*x)**2 + 1)/(2*c**2*d**2*f + 2*
d**4*f) + 2*B*a*d**3*f*x/(2*c**2*d**2*f + 2*d**4*f) + 2*B*b*c**2*d*log(c/d + tan(e + f*x))/(2*c**2*d**2*f + 2*
d**4*f) - 2*B*b*c*d**2*f*x/(2*c**2*d**2*f + 2*d**4*f) + B*b*d**3*log(tan(e + f*x)**2 + 1)/(2*c**2*d**2*f + 2*d
**4*f) + 2*C*a*c**2*d*log(c/d + tan(e + f*x))/(2*c**2*d**2*f + 2*d**4*f) - 2*C*a*c*d**2*f*x/(2*c**2*d**2*f + 2
*d**4*f) + C*a*d**3*log(tan(e + f*x)**2 + 1)/(2*c**2*d**2*f + 2*d**4*f) - 2*C*b*c**3*log(c/d + tan(e + f*x))/(
2*c**2*d**2*f + 2*d**4*f) + 2*C*b*c**2*d*tan(e + f*x)/(2*c**2*d**2*f + 2*d**4*f) - C*b*c*d**2*log(tan(e + f*x)
**2 + 1)/(2*c**2*d**2*f + 2*d**4*f) - 2*C*b*d**3*f*x/(2*c**2*d**2*f + 2*d**4*f) + 2*C*b*d**3*tan(e + f*x)/(2*c
**2*d**2*f + 2*d**4*f), True))

________________________________________________________________________________________